package com.dangz.dans.response;
/**
 * 业务接口码
 */
public enum ApiEnum {
	AUTH000("FF", "鉴权"),

	CS001("00", "测试"),
	XTGL("01","系统管理"),
	WXMK("02","微信模块");
	private String code;
	private String info;
	
	private ApiEnum(String code, String info) {
		this.code = code;
		this.info = info;
	}

	public String getCode() {
		return code;
	}
	
	/**
	 * 根据apiId查找对应的RespApiEnum
	 * 
	 * @param apiId api编号
	 * @return
	 */
	public static ApiEnum fromApiId(String apiId) {
		for(ApiEnum item : ApiEnum.values()) {
			if(item.toString().equalsIgnoreCase(apiId)) {
				return item;
			}
		}
		
		return null;
	}
	
}
